<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: dark)"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico">
  <link rel="mask-icon" href="/favicon.ico" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="/lib/@fortawesome/fontawesome-free/css/all.min.css" integrity="sha256-5eIC48iZUHmSlSUz9XtjRyK2mzQkHScZY1WdMaoz74E=" crossorigin="anonymous">
  <link rel="stylesheet" href="/lib/animate.css/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"blog.dqv5.com","root":"/","images":"/images","scheme":"Mist","darkmode":true,"version":"8.21.1","exturl":false,"sidebar":{"position":"right","width_expanded":320,"width_dual_column":240,"display":"always","padding":18,"offset":12},"hljswrap":true,"copycode":{"enable":true,"style":null},"fold":{"enable":true,"height":500},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"gitalk","storage":true,"lazyload":false,"nav":null,"activeClass":"gitalk"},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"top_n_per_article":1,"unescape":false,"preload":false,"trigger":"auto"}}</script><script src="/js/config.js"></script>

    <meta name="description" content="canvas 2048              body {             margin: 0;             padding: 0;         }          #myCanvas {             &#x2F;*border: red 1px solid;*&#x2F;             margin: 10px auto;">
<meta property="og:type" content="website">
<meta property="og:title" content="dqv5.com">
<meta property="og:url" content="http://blog.dqv5.com/pages/2048.html">
<meta property="og:site_name" content="dqv5.com">
<meta property="og:description" content="canvas 2048              body {             margin: 0;             padding: 0;         }          #myCanvas {             &#x2F;*border: red 1px solid;*&#x2F;             margin: 10px auto;">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2024-11-23T11:58:37.875Z">
<meta property="article:modified_time" content="2024-11-23T11:58:37.875Z">
<meta property="article:author" content="du qian">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://blog.dqv5.com/pages/2048">


<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":false,"lang":"zh-CN","comments":true,"permalink":"http://blog.dqv5.com/pages/2048.html","path":"pages/2048.html","title":""}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title> | dqv5.com
</title>
  

  <script src="/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?1752ae624eedea5ce859335ad2f0e657"></script>







  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">dqv5.com</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">49</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">20</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">61</span></a></li><li class="menu-item menu-item-留言板"><a href="/message-board/" rel="section"><i class="fa fa-comments fa-fw"></i>留言板</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
      <div class="search-header">
        <span class="search-icon">
          <i class="fa fa-search"></i>
        </span>
        <div class="search-input-container">
          <input autocomplete="off" autocapitalize="off" maxlength="80"
                placeholder="搜索..." spellcheck="false"
                type="search" class="search-input">
        </div>
        <span class="popup-btn-close" role="button">
          <i class="fa fa-times-circle"></i>
        </span>
      </div>
      <div class="search-result-container">
        <div class="search-result-icon">
          <i class="fa fa-spinner fa-pulse fa-5x"></i>
        </div>
      </div>
    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link"><span class="nav-text">方向控制：WASD、↑↓←→、手指滑动</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="du qian"
      src="/images/soccer.jpg">
  <p class="site-author-name" itemprop="name">du qian</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">61</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">20</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">49</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/duqian42707" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://stackoverflow.com/duqian42707" title="StackOverflow → https:&#x2F;&#x2F;stackoverflow.com&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fab fa-stack-overflow fa-fw"></i>StackOverflow</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://blog.csdn.net/duqian42707" title="CSDN → https:&#x2F;&#x2F;blog.csdn.net&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fas fa-link fa-fw"></i>CSDN</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://duqian42707.github.io/qiniu-host" title="图床 → https:&#x2F;&#x2F;duqian42707.github.io&#x2F;qiniu-host" rel="noopener me" target="_blank"><i class="far fa-image fa-fw"></i>图床</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner page posts-expand">


    
    
    
    <div class="post-block" lang="zh-CN"><header class="post-header">

<h1 class="post-title" itemprop="name headline">
</h1>

<div class="post-meta-container">
</div>

</header>

      
      
      
      <div class="post-body">
          <!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <script src="http://apps.bdimg.com/libs/jquery/1.11.3/jquery.min.js"></script>
    <title>canvas 2048</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        #myCanvas {
            /*border: red 1px solid;*/
            margin: 10px auto;
            border-radius: 10px;
            display: block;
        }
        .bottom{
            text-align: center;
        }
        .bottom>div{
            margin-top: 10px;
        }
        .con{
            color:white;
            background-color: green;
            display: inline-block;
            width:50px;
            height:50px;
            line-height: 50px;
            text-align: center;
        }
        .tips{
            text-align: center;
        }
    </style>

    <script type="text/javascript">
        $(function () {
            var canvas = document.getElementById("myCanvas");
            var context = canvas.getContext("2d");
            var d=12;
            var a=60;
            var directMap = {
                'W':0,
                'S':1,
                'A':2,
                'D':3,
                '&':0,
                '(':1,
                '%':2,
                '\'':3
            };
            //当前屏幕上所有的块
            var blocks = [
                0, 0, 0, 0,
                2, 0, 0, 0,
                0, 0, 2, 0,
                0, 0, 0, 2
            ];
            var newBlocks=[];//blocks的备份，用来保存目标状态
            var newIndex=[];//保存每个块的目标位置，如newIndex[4]=8表示第4个块移动到第8个块的位置（下移一格）
            //生成新数字
            var another_num = function(){
                var empty = [];
                for(var i = 0 ; i < blocks.length; i++){
                    if(blocks[i]==0){
                        empty.push(i)
                    }
                }
                var idx = empty[parseInt(Math.random() * empty.length)];
                blocks[idx] = Math.random() < 0.8 ? 2 : 4;
                drawBlock(idx)
            };
            //通过数组下标（0-15）计算4个相关的值
            var getPositon = function(n){
                var obj = {};
                obj.i = n%4;//第几列（从0开始）
                obj.j = parseInt(n/4);//第几行（从0开始）
                obj.x = (obj.i+1)*d+obj.i*a;//横坐标
                obj.y = (obj.j+1)*d+obj.j*a;//纵坐标
                return obj;
            };
            //画单个块和数字，若不指定x，y的值，则由index计算得出
            var drawBlock = function(index,dx,dy){
                context.fillStyle = '#ECE0C8';
                var num = blocks[index];
                if(num==0)return;
                var x = getPositon(index).x;
                var y = getPositon(index).y;
                if (dx != null)x = dx;
                if (dy != null)y = dy;
                context.fillRect(x,y,a,a);
                var fontSize = 30;
                var l = num.toString().length;
                if(l==4){
                    fontSize=25
                }else if(l==5){
                    fontSize=20
                }
                context.font='bold '+fontSize+'px Meiryo';
                context.fillStyle = '#7C736A';
                x=x+(a-fontSize*2*l/3)/2;
                y=y+(fontSize+a)/2;

                context.fillText(num.toString(),x,y);
            };

            var merged=[];
            //将cur合并到pre,若成功合并则返回pre，没合并则返回cur
            var merge=function(pre , cur){
                if(newBlocks[cur]!=0){
                    if(newBlocks[pre]==0){
                        newBlocks[pre]=newBlocks[cur];
                        newBlocks[cur]=0;
                        return pre
                    }else if(newBlocks[pre]==newBlocks[cur]&&merged.indexOf(pre)==-1){//已经合并过一此的pre块不再合并
                        newBlocks[pre]*=2;
                        newBlocks[cur]=0;
                        merged.push(pre);
                        return pre
                    }else{
                        return cur
                    }
                }else{
                    return cur
                }
            };
            //块的合并；计算本次操作后每个块目标位置（保存至newIndex数组）
            var getNewIndex = function (direct) {
                merged=[];
                switch (direct) {
                    case 0:
                        for (var j = 0; j < 4; j++) {
                            for (var i = 0; i < 4; i++) {
                                var k = 1;
                                var index = 4*i+j;
                                while (4 * (i - k) + j >= 0) {
                                    index = merge(4 * (i - k) + j, 4 * (i - k + 1) + j);
                                    if(index==4*i+j)break;
                                    k++;
                                }
                                newIndex[4*i+j]=index;
                            }
                        }
                        break;
                    case 1:
                        for (var j = 0; j < 4; j++) {
                            for (var i = 3; i >= 0; i--) {
                                var k = 1;
                                var index = 4*i+j;
                                while (4 * (i + k) + j < blocks.length) {
                                    index = merge(4 * (i + k) + j, 4 * (i + k - 1) + j);
                                    if(index==4*i+j)break;
                                    k++;
                                }
                                newIndex[4*i+j]=index;
                            }
                        }
                        break;
                    case 2:
                        for (var i = 0; i < 4; i++) {
                            for (var j = 0; j < 4; j++) {
                                var k = 1;
                                var index = 4*i+j;
                                while (j - k >= 0) {
                                    index = merge(4 * i + j - k, 4 * i + j - k + 1);
                                    if(index==4*i+j)break;
                                    k++;
                                }
                                newIndex[4*i+j]=index;
                            }
                        }
                        break;
                    case 3:
                        for (var i = 0; i < 4; i++) {
                            for (var j = 3; j >= 0; j--) {
                                var k = 1;
                                var index = 4*i+j;
                                while (j + k < 4) {
                                    index = merge(4 * i + j + k, 4 * i + j + k - 1);
                                    if(index==4*i+j)break;
                                    k++;
                                }
                                newIndex[4*i+j]=index;
                            }
                        }
                        break;
                    default:
                        break;
                }
            };
            //动画结束后刷新每个块的信息，产生一个新的块
            var stopMoving = function(){
                init();
                for(var n=0;n<blocks.length;n++){
                    blocks[n]=newBlocks[n]+0;
                    drawBlock(n)
                }
                another_num()
            };
            //滑动操作
            var moveBlocks = function(direct) {
                //先将所有块的当前状态复制到新数组中
                for (var n = 0; n < blocks.length; n++) {
                    newBlocks[n] = blocks[n] + 0
                }
                //合并，计算本次操作后每个块目标位置
                getNewIndex(direct);

                //动画开始
                var t = 0;
                var int = setInterval(function () {
                    //初始化背景
                    init();
                    //画有数字的块
                    switch (direct) {
                        case 0:
                            var stop = true;
                            for (var n = 0; n < blocks.length; n++) {
                                if (blocks[n] == 0)continue;
                                var x = getPositon(n).x;
                                var y = getPositon(n).y;
                                y -= d * 4 * t;//一点点地改变坐标 实现动画效果
                                if (y <= getPositon(newIndex[n]).y) {//本块到达目标位置，不再动了
                                    y = getPositon(newIndex[n]).y
                                } else {//本块没有到达目标位置，动画不能停
                                    stop = false
                                }
                                drawBlock(n, null, y)
                            }
                            if (stop) {
                                //动画结束，重新给数组赋值
                                clearInterval(int);
                                stopMoving()
                            }
                            break;
                        case 1:
                            var stop = true;
                            for (var n = 0; n < blocks.length; n++) {
                                if (blocks[n] == 0)continue;
                                var x = getPositon(n).x;
                                var y = getPositon(n).y;
                                y += d * 4 * t;
                                //停止移动的条件：该块到达最终位置
                                if (y >= getPositon(newIndex[n]).y) {
                                    y = getPositon(newIndex[n]).y
                                } else {
                                    stop = false
                                }
                                drawBlock(n, null, y)
                            }

                            if (stop) {
                                //动画结束，重新给数组赋值
                                clearInterval(int);
                                stopMoving();
                            }
                            break;
                        case 2:
                            var stop = true;
                            for (var n = 0; n < blocks.length; n++) {
                                if (blocks[n] == 0)continue;
                                var x = getPositon(n).x;
                                var y = getPositon(n).y;
                                x -= d * 4 * t;
                                if (x <= getPositon(newIndex[n]).x) {
                                    x = getPositon(newIndex[n]).x
                                } else {
                                    stop = false
                                }
                                drawBlock(n, x, null)
                            }
                            if (stop) {
                                //动画结束，重新给数组赋值
                                clearInterval(int);
                                stopMoving()
                            }
                            break;
                        case 3:
                            var stop = true;
                            for (var n = 0; n < blocks.length; n++) {
                                if (blocks[n] == 0)continue;
                                var x = getPositon(n).x;
                                var y = getPositon(n).y;
                                x += d * 4 * t;
                                if (x >= getPositon(newIndex[n]).x) {
                                    x = getPositon(newIndex[n]).x
                                } else {
                                    stop = false
                                }
                                drawBlock(n, x, null)
                            }
                            if (stop) {
                                //动画结束，重新给数组赋值
                                clearInterval(int);
                                stopMoving()
                            }
                            break;
                    }
                    t++
                }, 20)
            };



            //滑屏监听
            var startX,startY;
            $('#myCanvas').bind("touchstart", function(e) {
                e.preventDefault();
                startX = e.originalEvent.changedTouches[0].pageX;
                startY = e.originalEvent.changedTouches[0].pageY;
            });
            $('#myCanvas').bind("touchend", function(e) {
                e.preventDefault();
                var moveEndX = e.originalEvent.changedTouches[0].pageX;
                var moveEndY = e.originalEvent.changedTouches[0].pageY;
                var X = moveEndX - startX;
                var Y = moveEndY - startY;
                if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {//上
                    moveBlocks(0)
                }else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {//下
                    moveBlocks(1)
                }else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {//左
                    moveBlocks(2)
                }else if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {//右
                    moveBlocks(3)
                }
            });
            //键盘监听
            document.onkeydown = function (e) {
                var keynum, keychar;
                if(window.event){       // IE
                    keynum = e.keyCode;
                }
                else if(e.which){       // Netscape/Firefox/Opera
                    keynum = e.which;
                }
                keychar = String.fromCharCode(keynum);
                if(['W', 'S', 'A', 'D','&','(','%','\''].indexOf(keychar) > -1){
                    moveBlocks(directMap[keychar])
                }
            };
            //按钮监听
            var btns = document.getElementsByClassName("con");
            for(var i=0;i<btns.length;i++){
                btns[i].onclick = function() {
                    moveBlocks(directMap[this.id])
                }
            }


            //初始化 开始
            var init = function() {
                //画背景
                context.clearRect(0, 0, 300, 300);
                context.fillStyle = '#B8AF9E';
                context.fillRect(0, 0, 300, 300);
                context.fillStyle = '#CCC0B2';
                for (var i = 1; i <= 4; i++) {
                    for (var j = 1; j <= 4; j++) {
                        context.fillRect(i * d + (i - 1) * a, j * d + (j - 1) * a, a, a)
                    }
                }
            };
            init();
            //画有数字的块
            for (var n = 0; n < blocks.length; n++) {
                drawBlock(n)
            }


        })
    </script>

</head>
<body>
<div class="main">
    <canvas id="myCanvas" width="300" height="300" ></canvas>
</div>
<div class="bottom" style="display: none;">
    <div>
        <div id="W" class="con">W</div>
    </div>
    <div>
        <div id="A" class="con">A</div>
        <div id="S" class="con">S</div>
        <div id="D" class="con">D</div>
    </div>
</div>
<div class="tips"><h4>方向控制：WASD、↑↓←→、手指滑动</h4></div>
</body>
</html>
      </div>
      
      
      
    </div>

    
    


    <div class="comments gitalk-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">冀ICP备17034993号-1 </a>
  </div>
  <div class="copyright">
    &copy; 2016 – 
    <span itemprop="copyrightYear">2024</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">du qian</span>
  </div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/mist/" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>
  <div class="upyun-league">
    本网站由<a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" style="border-bottom: none;">
      <img src="/images/upyun_logo.png" alt="又拍云" style="display: inline;height: 30px;vertical-align: bottom;"/>
    </a>提供CDN加速/云存储服务
  </div>


    </div>
  </footer>

  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>
  <div class="sidebar-dimmer"></div>
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>

  <a href="https://github.com/duqian42707" class="github-corner" title="在 GitHub 上关注我" aria-label="在 GitHub 上关注我" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="/lib/animejs/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/sidebar.js"></script><script src="/js/next-boot.js"></script>

  <script src="/lib/hexo-generator-searchdb/dist/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>


  <script class="next-config" data-name="mermaid" type="application/json">{"enable":true,"theme":"forest","js":{"url":"/lib/mermaid/dist/mermaid.min.js","integrity":"sha256-G8ouPAnw4zzMbnAenHnVz6h9XpKbNdOkrqTh7AadyHs="}}</script>
  <script src="/js/third-party/tags/mermaid.js"></script>





  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<link rel="stylesheet" href="/lib/gitalk/dist/gitalk.css" integrity="sha256-AJnUHL7dBv6PGaeyPQJcgQPDjt/Hn/PvYZde1iqfp8U=" crossorigin="anonymous">

<script class="next-config" data-name="gitalk" type="application/json">{"enable":true,"github_id":"duqian42707","repo":"blog-comment","client_id":"c9f48bc2fea3d4ce5d93","client_secret":"154d6227d3d7b532b36bfc1ce030121f0263ac90","admin_user":"duqian42707","distraction_free_mode":false,"proxy":"https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token","language":"zh-CN","js":{"url":"/lib/gitalk/dist/gitalk.min.js","integrity":"sha256-MVK9MGD/XJaGyIghSVrONSnoXoGh3IFxLw0zfvzpxR4="},"path_md5":"10ab00bd14e2e8d9ebcdd44c7f05d215"}</script>
<script src="/js/third-party/comments/gitalk.js"></script>

</body>
</html>
